<template>
    <a-trigger :trigger="['click', 'hover', 'focus']" position="br" :popup-translate="[0, 5]">
        <div class="flex"> <i :class="['EachApp', iconfont]"></i>{{ name }}</div>
        <template #content>
            <div class="trigger-style btn-list">
                <div class="item" v-for="item in btnList" :key="item.value" @click="handleBtn(item)">
                    <a-button>{{ item.label }}</a-button>
                </div>
                <slot name="content"></slot>
            </div>
        </template>
    </a-trigger>
</template>
<script lang="ts" setup>
import mixin from "@/mixins/index";
const { handleMixinPopover } = mixin();
defineProps({
    btnList:{ type: Array, default: () => { return [] } },// 按钮列表
    iconfont:{ type: String, default: () => { return 'EachApp_gengduo1' } },// 图标
});
const btnRef = ref();
const emit = defineEmits(['handleBtn']);

// 点击按钮
const handleBtn = (e) => {
    emit('handleBtn', e);
}
</script>